<!--
 * @Description: In User Settings Edit
 * @Author: your name
 * @Date: 2019-09-06 09:39:15
 * @LastEditTime: 2019-09-06 15:30:26
 * @LastEditors: Please set LastEditors
 -->
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
    <f:layout name="Default" />

    This Template is responsible for creating a table of domain objects.

    If you modify this template, do not forget to change the overwrite settings
    in /Configuration/ExtensionBuilder/settings.yaml:
    Resources:
    Private:
    Templates:
    List.html: keep

    Otherwise your changes will be overwritten the next time you save the extension in the extension builder

    <f:section name="content">
        <f:flashMessages />

        <div class="portlet light ">
            <div class="portlet-title">
                <div class="caption">
                    <!-- <f:link.action action="new" class="btn btn-info">新增活动</!--> -->
                </div>
                <div class="actions">
                    <div class="btn-group btn-group-devided">
                        <f:form action="list" name="search" class="form-inline" method="GET">
                            <div class="input-group">
                                <div class="input-icon">
                                    <i class="fa fa-search"></i>
                                    <f:form.textfield name="keyword" value="{keyword}" class="form-control"
                                        placeholder="活动名称" />
                                </div>
                                <span class="input-group-btn">
                                    <f:form.submit class="btn btn-success" value="查询" />
                                </span>
                            </div>
                        </f:form>
                    </div>
                </div>
                <div class="portlet-body">
                    <div class="table-scrollable">
                        <f:widget.paginate objects="{checkusers}" as="checkusersPagination"
                            configuration="{settings.paginate}">
                            <table class="tx_projectsystem table table-hover table-light">
                                <thead>
                                    <tr class="uppercase">
                                        <th>序号</th>
                                        <th>名称</th>
                                        <th>联系方式</th>
                                        <th>签到时间</th>
                                        <th class="text-center">操作</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <f:for each="{checkusersPagination}" as="checkuser" iteration="itemIteration1">
                                        <tr>
                                            <td>
                                                {f:cObject(typoscriptObjectPath:'lib.calc',
                                                data:'{itemIteration1.cycle}+({page}-1)*{settings.paginate.itemsPerPage}')}
                                            </td>
                                            <td>{checkuser.name}</td>
                                            <td>{checkuser.telephone}</td>
                                            <td>{checkuser.crdate}</td>
                                            <td>
                                                <f:for each="{sendStat}" as="st">
                                                    <f:if condition="{st.uid}=={activity.sendstat}">
                                                        {st.name}
                                                    </f:if>
                                                </f:for>
                                            </td>
                                            <td class="text-center">
                                                <f:link.page pageUid="{settings.page}"
                                                    additionalParams="{activity : activity}"
                                                    class="btn btn-success btn-xs">签到管理</f:link.page>
                                                <f:if condition="{activity.sendstat}==0">
                                                    <f:then>
                                                        <f:link.action action="send"
                                                            arguments="{activity : activity,stat:1}"
                                                            onclick="return confirm('您确定要执行该操作吗?');"
                                                            class="btn btn-info btn-xs edit">发布</f:link.action>
                                                    </f:then>
                                                    <f:else if="{activity.sendstat}==1">
                                                        <f:link.action action="send"
                                                            arguments="{activity : activity,stat:2}"
                                                            onclick="return confirm('您确定要执行该操作吗?');"
                                                            class="btn btn-info btn-xs edit">下线</f:link.action>
                                                    </f:else>
                                                    <f:else>
                                                        <a href="javascript:;"
                                                            class="btn btn-info btn-xs disabled">已下线</a>
                                                    </f:else>
                                                </f:if>
                                                <f:link.action action="edit" arguments="{activity : activity}"
                                                    class="btn btn-info btn-xs edit">编辑</f:link.action>
                                                <f:link.action action="delete" arguments="{activity : activity}"
                                                    onclick="return confirm('您确定要删除吗?');"
                                                    class="btn btn-danger btn-xs delete btn-del">删除</f:link.action>
                                            </td>
                                        </tr>
                                    </f:for>
                                </tbody>
                            </table>
                        </f:widget.paginate>
                    </div>
                </div>
            </div>
        </div>
    </f:section>

</html>